﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_DeThi_DSDeThi : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack) {
            LoadDDL();
            LoadMonThi();
        }
    }
    private void LoadMonThi()
    {
        List<MonThiINFO> dsmonthi = MonThiDAL.listAll();
        ddlMonThi.DataSource = dsmonthi;
        ddlMonThi.DataTextField = "TenMon";
        ddlMonThi.DataValueField = "MaMon";
        DataBind();
    }
    private void LoadDDL()
    {
        DataTable ds = DeThiDAL.DataTable();
        GridView1.DataSource = ds;
        GridView1.DataBind();
    }
    protected void refresh_Click(object sender, EventArgs e)
    {
        LoadDDL();
    }
}